# coding: utf-8
class ObjectiveKyusuController < ApplicationController
  def index
    @path = File.join(ObjectiveKyusu::LIBRALY_DIR_PAH)
  end

  def show
    @path = File.join(ObjectiveKyusu::LIBRALY_DIR_PAH, params[:path])
  end

  # === フォルダオープン時のAjax
  def ajax_open_folder
    path = File.join(ObjectiveKyusu::LIBRALY_DIR_PAH, params[:path])
    render partial: "ajax_open_folder", locals: {path: path}
  end

  # === フォルダclose時のAjax
  def ajax_close_folder
    path = File.join(ObjectiveKyusu::LIBRALY_DIR_PAH, params[:path])
    render partial: "ajax_close_folder", locals: {path: path}
  end
end
